package com.zhxt.system.domain;

import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 文件内容对象
 */

@Getter
@Setter
public class ZhxtSourceInfo {
    //自增主键
    private int id;
    //内容类型
    private String ctype;
    //内容编号
    private String sourcenum;
    //排序
    private int sortnum;
    //图片地址
    private String imgurl;
    private String namedesc;
    public ZhxtSourceInfo xss() {
        this.ctype = StringEscapeUtils.escapeHtml4(this.ctype);
        this.sourcenum = StringEscapeUtils.escapeHtml4(this.sourcenum);
        this.imgurl = StringEscapeUtils.escapeHtml4(this.imgurl);
        this.namedesc = StringEscapeUtils.escapeHtml4(this.namedesc);
        this.id = this.id;
        this.sortnum = this.sortnum;
        return this;

    }
    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("ctype", getCtype())
                .append("sourcenum", getSourcenum())
                .append("sortnum", getSortnum())
                .append("imgurl", getImgurl())
                .append("namedesc", getNamedesc())
                .toString();
    }
}
